﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace _2._16._2015_Blog.Models
{
    public class BlogPost
    {
        public BlogPost()
        {
            DateCreated = DateTime.Now;
            Comments = new List<Comment>();
        }
        public int Id { get; set; }
        public string Text { get; set; }
        public string UserName { get; set; }
        public DateTime DateCreated { get; private set; }
        public string Title { get; set; }
        public List<Comment> Comments { get; set; }
    }

    public class Comment
    {
        public Comment()
        {
            DateCreated = DateTime.Now;
        }
        public int BlogPostId { get; set; }
        public string Text { get; set; }
        public string UserName { get; set; }
        public DateTime DateCreated { get; private set; }
    }
}